package com.saumya.robotlegs.events
{
	import flash.events.Event;
	import flash.filesystem.File;

	public class JSFLCreationEvent extends Event
	{
		public static const MASTER_CREATION:String='master_file_created_event';
		public static const BEGIN_BATCH_CREATION:String='begin_batchfile_creation_event';
		public static const COMPLETE_BATCH_CREATION:String='batch_creation_complete_event';
		
		//this is used with BEGIN_BATCH_CREATION
		private var numFilesInBatch:uint=0;
		//this is used with COMPLETE_BATCH_CREATION
		private var allFiles:Array=[];
		private var mainFile:File=new File();
		
		public function JSFLCreationEvent(type:String,bubbles:Boolean=false,cancelable:Boolean=false)
		{
			super(type,bubbles,cancelable);
		}
		
		public override function clone():Event
		{
			var evt:JSFLCreationEvent=new JSFLCreationEvent(this.type,this.bubbles,this.cancelable);
			evt.setNumFilesInBatch(this.numFilesInBatch);
			return evt;
		}
		
		public function setNumFilesInBatch(numberOfFiles:uint):void
		{
			this.numFilesInBatch=numberOfFiles;
		}
		
		public function getNumFilesInBatch():uint
		{
			return (this.numFilesInBatch);
		}
		
		public function setMainBatchFile(fileRef:File):void
		{
			this.mainFile=fileRef;
		}
		
		public function getMainBatchFile():File
		{
			return this.mainFile;
		}
		
		public function setBatchFiles(files:Array):void
		{
			this.allFiles=files;
		}
		public function getBatchFiles():Array
		{
			return this.allFiles;
		}
	}
}